// pages/shoppingCart/orderCompletion/index.js
Page({
  
  data: {
    status:'备货中',
    time:'预计8月7日前发货',
    info:'王先生 13232211217',
    address:'广东省珠海市金湾区广东科学技术职业学院广东省珠海市金湾区广东科学技术职业学院',
    shopName:'小象精选',
    number:'400-800-5050',//商家号码
    items:[
      {
        img:'https://hbimg.huabanimg.com/c19e5e841e40b7fdf57d8ad581fa29133fb0338944d81a-osb5zz_fw658',
        name:'国产蓝莓1盒125g',
        price:'9.9',
        desc:'5.9元/瓶x2件'
      },{
        img:'https://hbimg.huabanimg.com/c19e5e841e40b7fdf57d8ad581fa29133fb0338944d81a-osb5zz_fw658',
        name:'国产蓝莓1盒125g',
        price:'9.9',
        desc:'5.9元/瓶x2件'
      },{
        img:'https://hbimg.huabanimg.com/c19e5e841e40b7fdf57d8ad581fa29133fb0338944d81a-osb5zz_fw658',
        name:'国产蓝莓1盒125g',
        price:'9.9',
        desc:'5.9元/瓶x2件'
      },{
        img:'https://hbimg.huabanimg.com/c19e5e841e40b7fdf57d8ad581fa29133fb0338944d81a-osb5zz_fw658',
        name:'国产蓝莓1盒125g',
        price:'9.9',
        desc:'5.9元/瓶x2件'
      }
    ],
    price:'15.99',
    shopPrice:'9.9',
    trans:'0',
    orderTime:'2019-08-07 16:00',
    orderNumber:'20190807100000'
  },
  // 点击复制按钮复制订单号
  copy:function(){
    wx.setClipboardData({
      data: this.data.orderNumber
    });
  },
  // 点击联系商家调用电话api
  callphone(){
    wx.showModal({
      content: this.data.number,
      confirmText: '呼叫',
      confirmColor: '#3CC51F',
      success: (result) => {
        if(result.confirm){
          wx.makePhoneCall({
            phoneNumber: this.data.number
          });
        }
      }
    })
  },
  onShareAppMessage: function () {

  }
})